<?php
/*
	监听会员登陆事件
	检查会员是否在分销插件中注册，如果尚未注册，此处注册！
*/
defined('BY_JYA') or exit('error');
$member=$this->get('member',array('mid'=>$_SESSION['uid']),array('mid'));
$myteam=$this->get('team',array('mid'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']));
if(!$member['id']){
	$this->model('member')->register();
}
if(!$myteam['id'] && !$this->setting['isshenhe'] && $this->setting['become']==0){
	$this->model('member')->apply_agent($_SESSION['uid']);
	$this->update('member',array('is_agent'=>1),array('mid'=>$_SESSION['uid'],'is_agent'=>0));
}